Basic

Tips
  • Tips for C .

    • C Versions.

      • He uses C99.

    • Compiler Flags.

    • Unity Build.

    • Debugger.

      • Recurring segfault problems can only really be debugged with a debugger. It's very hard to debug a segfault with prints, and the segfault error given is usually terrible and not descriptive.

    • ASan.

      • Address Sanitizer.

      • Accessing memory out of scope causes a Segfault, but accessing memory within the scope of something else in the code can cause memory corruption.

      • For this reason, ASan is used to check if access is within the array bounds, etc.

    • Arrays and Strings.

      • He creates his own arrays and strings using structs, so he can implement his own "boundary checks", etc.

    • Indexes and Pointers.

      • Suggestion: store the index of an object instead of a pointer to the object.

      • Apparently, this helps with array resizing, etc.

    • Arenas.

      • Related to Lifetime.

      • "Arena = One Lifetime".

      • It's where you store all data that has the same lifetime.

Includes

  • Unity Build.

    • A way to handle #includes  and avoid duplicate includes.

    • I found it interesting; I saw it being used in Zig too.

  • #pragma once  in .h  files.

Libraries

  • gb library .

    • A helper library by Ginger Bill, to group everything together.

    • (2025-07-03) On a quick glance, I found it very useful, as it resembles Odin types.

  • stb .

    • Single-file public domain libraries for C/C++.

    • Created by Sean Barrett.

    • ~ Advice for Writing Small Programs in C .

      • Quotes :

        • The C std library is terrible.

          • Some APIs are not designed very well.

          • strcopy  is notoriously bad.

        • I needed a way to systematically reuse code.

        • JAI is quite interesting.

        • He worked on Thief , creating the render engine.

          • Thief is known for having good programming; use of 'fat structs'.

          • It was the first time ECS was used; the entity is just an ID for a lookup table.

        • OOP is a waste of time.

        • Spend your time writing useful code, not doing other things. Aka, minimize overhead.

        • Many libraries are written only for big projects.

        • He disagrees with Casey on some things, but agrees quite a bit on others.

      • Overall, the video is mostly irrelevant; the only "relevant" things are the quotes I put.